package com.houkunlin.dic;

import com.houkunlin.system.dic.starter.DicUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HouKunLin
 */
@Api(tags = "系统字典")
@RestController
@RequestMapping("dic")
public class DicController {
    @ApiOperation("获取系统字典值列表信息")
    @ApiImplicitParam(name = "dicType", value = "字典类型代码", required = true, paramType = "path", dataTypeClass = String.class)
    @GetMapping("{dicType}")
    public Object dicType(@PathVariable String dicType) {
        return DicUtil.getDicType(dicType);
    }
}
